package com.itheima.day14.Executors;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

public class Test {
    public static void main(String[] args) {
        ScheduledExecutorService pools = Executors.newScheduledThreadPool(2);
        pools.schedule(()->{
            System.out.println("5秒后执行");
        }
                , 5, java.util.concurrent.TimeUnit.SECONDS);
    }


}
